#coding=utf8
error_dict = {
    'url_fail' : (1000, 'Can not find this page.'),
    'user_name_error' : (2000, 'User name wrong.'),
    'parse_params_fail_create' : (3001, 'parse_params_fail_create'),
    'parse_params_fail_get' : (3002, 'parse_params_fail_get'),
    'parse_params_fail_remove' : (3002, 'parse_params_fail_remove'),
    'parse_params_fail_commit' : (3003, 'parse_params_fail_commit'),
    'parse_params_fail_list' : (3004, 'parse_params_fail_list'),
    'parse_params_fail_search' : (3005, 'parse_params_fail_search'),
    'parse_params_fail_auth' : (3006, 'parse_params_fail_auth'),
    'undefine' : (10000, 'Undefined error.')
    }

def get_error_info(code):
    if error_dict.has_key(code):
        return error_dict[code]
    return error_dict['undefined']
